package com.wswy.wyjk.ui.practiceNew.Adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wswy.wyjk.R;
import com.wswy.wyjk.model.PracticeData;
import com.wswy.wyjk.ui.widget.RecordStatusTextView;

public class TIMUChooseAdapter extends BaseQuickAdapter<PracticeData, BaseViewHolder> {

    public TIMUChooseAdapter() {
        super(R.layout.layout_record_item);
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, PracticeData practiceData) {
        RecordStatusTextView recordStatusTextView = viewHolder.getView(R.id.tv_position);
        if (practiceData.getDoIt() == 1) {
            recordStatusTextView.setRight();
        } else if (practiceData.getDoIt() == 2) {
            recordStatusTextView.setWrong();
        } else {
            recordStatusTextView.setNormal();
        }
        recordStatusTextView.setText((viewHolder.getAdapterPosition() + 1) + "");
    }

}
